package library.service.impl;

import javax.annotation.Resource;
import library.mapper.BorrowMapper;
import library.po.Borrow;
import library.service.BorrowService;

import java.util.List;

public class BorrowServiceImpl implements BorrowService{

    @Resource
    private BorrowMapper borrowMapper;

    @Override
    public int deleteByBorrowId(Integer borrowId) {
        return borrowMapper.deleteByBorrowId(borrowId);
    }

    @Override
    public int insert(Borrow record) {
        return borrowMapper.insert(record);
    }

    @Override
    public List<Borrow> selectByUserId(String userId) {
        return borrowMapper.selectByUserId(userId);
    }

    @Override
    public int updateStateByBorrowId(Borrow record) {
        return borrowMapper.updateStateByBorrowId(record);
    }

}
